/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.finance.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.medusa.gruul.common.data.base.BaseEntity;
import com.medusa.gruul.finance.api.enums.AccountTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * <p>
 * 资金账户
 * </p>
 *
 * @author alan
 * @since 2020 -02-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_finance_account")
@ApiModel(value = "FinanceAccount对象", description = "资金账户")
public class FinanceAccount extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商铺ID
     */
    @ApiModelProperty(value = "商铺ID")
    @TableField("shop_id")
    private String shopId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    /**
     * 累计佣金
     */
    @ApiModelProperty(value = "累计佣金")
    @TableField("brokerage_total")
    private BigDecimal brokerageTotal;

    /**
     * 当前佣金（可提现）
     */
    @ApiModelProperty(value = "当前佣金（可提现）")
    @TableField("brokerage")
    private BigDecimal brokerage;

    /**
     * 预计佣金
     */
    @ApiModelProperty(value = "预计佣金")
    @TableField("brokerage_frozen")
    private BigDecimal brokerageFrozen;

    /**
     * 账户类型
     */
    @ApiModelProperty(value = "账户类型：0->团长;1->区域团长;2->提货点;")
    @TableField("type")
    private AccountTypeEnum type;

    /**
     * 源ID
     */
    @ApiModelProperty(value = "源ID")
    @TableField("source_id")
    private String sourceId;



}
